
package com.quartet.utils.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * <p>
 * 服务类型
 * </p>
 *
 * @author Zheng Jie
 * @date 2020-05-07
 */
@Getter
@AllArgsConstructor
public enum ServiceTypeEnum {

    LOCATION("location", "位置服务"),
    ALARM ("alarm", "报警服务"),
    VIDEO ("videoStreaming", "视频流服务"),
    MAP ("map", "地图服务"),
    STATISTIC("statisticalAnalysis", "统计分析服务");
    private final String value;
    private final String description;

    public static ServiceTypeEnum find(String val) {
        for (ServiceTypeEnum dataScopeEnum : ServiceTypeEnum.values()) {
            if (val.equals(dataScopeEnum.getValue())) {
                return dataScopeEnum;
            }
        }
        return null;
    }

}
